//
//  NetWorkTool+Status.swift
//  微博新浪
//
//  Created by hezerong on 16/6/13.
//  Copyright © 2016年 Rocky. All rights reserved.
////如果在定义数组时，遇到此问题：Type of expression is ambiguous without more context
// "since_id":"\(since_id)",   加"\()"
//"max_id":"\(max_id)"

import Foundation

extension RHNetWorkTool{

    func loadStatus(since_id:Int64 = 0,max_id:Int64=0,callBack:([String:AnyObject]?)->()){
    
     let url = "https://api.weibo.com/2/statuses/home_timeline.json"
        
        if let accessToken = UserAccount.sharedUserAccunt.access_token{
        
            let parameters = ["access_token":accessToken,
                              "since_id":"\(since_id)",
                              "max_id":"\(max_id)",
//                               "count":"1"
            ]
            
            
            request(url, method: .GET, parameters: parameters, callBack: { (response:[String : AnyObject]?) -> () in
                
                callBack(response)
            })
        
        }
    
    }


}